package projorientado.ocr.vfeature;

import projorientado.ocr.vfeature.impl.ImageLayerFeatures;
import projorientado.image.ImageLayerData;

/**
 *  Representa o sistema que extrai features de uma determinada imagem.<BR>
 *  Para que não haja distorções entre duas imagens extraidas, o maior tamanho da imagenns é passado.
 */
public interface FeaturesExtractor {
    
    public SequentialFeatures extractFeatures(ImageLayerData image, int width, int height);
    
    public static class PointExtractor implements FeaturesExtractor {
        
        public static PointExtractor instanceResizer = new PointExtractor(ImageLayerFeatures.FORMATATION_RESIZE);
        public static PointExtractor instanceTopRight = new PointExtractor(ImageLayerFeatures.FORMATATION_ALIGN_TOP_RIGHT);
        public static PointExtractor instanceCenter = new PointExtractor(ImageLayerFeatures.FORMATATION_ALIGN_CENTER);
        
        private int formatation;

        public PointExtractor(int formatation) {
            this.formatation = formatation;
        }

        
        public SequentialFeatures extractFeatures(ImageLayerData image, int width, int height) {
            return new ImageLayerFeatures(image,formatation,width,height);
        }
        
    }
    
}
